<?php
/**
 * @Created by PhpStorm.
 * @User: jameswong
 * @Date: 12/7/16
 * @Time: 9:53 AM
 * @Copyright : Fiidee.Monda.Cn
 */

namespace tasks;

use herosphp\bean\Beans;
use trading\service\OrderService;
use tasks\interfaces\ITask;
use herosphp\core\Loader;

Loader::import('tasks.interfaces.ITask', IMPORT_CLIENT);
class OrderTask implements ITask{
    /**
     * @var orderService
     */
    protected $service;

    public function __construct()
    {
        $this->service = Beans::get("trading.tradingOrder.service");
    }
    public function run() {
        //超出设定时间关闭未支付订单
        $this->service->batchClose();
    }

}